package com.wt.admin.controller.model;

import com.aizuda.easy.security.domain.Rep;
import com.wt.admin.config.aspect.annotation.LogAno;
import com.wt.admin.domain.dto.model.ModelListDTO;
import com.wt.admin.domain.vo.model.ModelListVO;
import com.wt.admin.domain.vo.sys.UserVO;
import com.wt.admin.service.model.ModelProxyService;
import com.wt.admin.util.PageUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("model")
public class ModelController {

    @Resource
    private ModelProxyService modelProxyService;

    @LogAno(name = "模型微调")
    @PostMapping("fineTune")
    public Rep<ModelListVO> fineTune(@RequestBody ModelListDTO data){
        return Rep.ok(modelProxyService.fineTune(data));
    }

    @LogAno(name = "模型列表")
    @PostMapping("modelList")
    public Rep<PageUtil.PageVO<ModelListVO>> modelList(@RequestBody PageUtil.PageDTO<ModelListDTO> data){
        return Rep.ok(modelProxyService.modelList(data));
    }

    @LogAno(name = "测试模型")
    @PostMapping("modelTest")
    public Rep<ModelListVO> modelTest(@RequestBody ModelListDTO data){
        return Rep.ok(modelProxyService.modelTest(data));
    }

    @LogAno(name = "模型删除")
    @PostMapping("modelDel")
    public Rep<ModelListVO> modelDel(@RequestBody ModelListDTO data){
        return Rep.ok(modelProxyService.modelDel(data));
    }

}
